﻿
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "freeLib"
#define MyAppVersion "4.9.1"
#define MyAppURL "https://sourceforge.net/projects/freelibdesign/"
#define MyAppExeName "freeLib.exe"
#define AppReleasePath  "P:\LibOpen\build-Lib_win-Desktop_Qt_5_3_MinGW_32bit-Release\src\release"
#define AppSrcPath  "P:\LibOpen\Lib\src"
#define AppLibPath  "C:\Qt\5.3\mingw482_32\bin"           


[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{8F4EA664-7A90-4431-8132-3C0968427759}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=freeLib{#MyAppVersion}
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"

[Tasks]
Name: "portablemode"; Description: "{cm:PortableMode}"; Flags: unchecked
Name: "menuicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Files]
Source: "{#AppReleasePath}\freeLib.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppSrcPath}\freeLib.sqlite"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ;Tasks: portablemode
Source: "{#AppSrcPath}\Help\*"; DestDir: "{app}\Help"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#AppSrcPath}\xsl\*"; DestDir: "{app}\xsl";Excludes:"kindlegen"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#AppSrcPath}\..\\..\\kindlegen_win32\kindlegen.exe"; DestDir: "{app}\xsl"; Flags: ignoreversion
Source: "{#AppSrcPath}\..\\..\\win_ssl\libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppSrcPath}\..\\..\\win_ssl\ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppSrcPath}\*.qm"; DestDir: "{app}\language"; Flags: ignoreversion
Source: "{#AppSrcPath}\ABC\abc_*.txt"; DestDir: "{app}\language"; Flags: ignoreversion
Source: "{#AppSrcPath}\qt.conf"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\..\plugins\imageformats\*"; DestDir: "{app}\plugins\imageformats";Excludes:"*d.dll"; Flags: ignoreversion
Source: "{#AppLibPath}\..\plugins\platforms\*"; DestDir: "{app}\plugins\platforms";Excludes:"*d.dll"; Flags: ignoreversion
Source: "{#AppLibPath}\..\plugins\sqldrivers\qsqlite.dll"; DestDir: "{app}\plugins\sqldrivers";Excludes:"*d.dll"; Flags: ignoreversion
Source: "{#AppLibPath}\..\plugins\printsupport\*"; DestDir: "{app}\plugins\printsupport";Excludes:"*d.dll"; Flags: ignoreversion
;Source: "{#AppLibPath}\icudt51.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "{#AppLibPath}\icuin51.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "{#AppLibPath}\icuuc51.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\icudt52.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\icuin52.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\icuuc52.dll"; DestDir: "{app}"; Flags: ignoreversion
;mingw
Source: "{#AppLibPath}\libgcc_s_dw2-1.dll"; DestDir: "{app}"; Flags: ignoreversion    
Source: "{#AppLibPath}\libstdc++-6.dll"; DestDir: "{app}"; Flags: ignoreversion      
Source: "{#AppLibPath}\libwinpthread-1.dll"; DestDir: "{app}"; Flags: ignoreversion  
;end
;vc
;Source: "{#AppLibPath}\libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "{#AppLibPath}\libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
;end
Source: "{#AppLibPath}\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Multimedia.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5MultimediaWidgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Network.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5OpenGL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Positioning.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5PrintSupport.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Qml.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Quick.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Sensors.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Sql.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5WebKit.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5WebKitWidgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppLibPath}\Qt5Xml.dll"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Setup]
Uninstallable=not IsTaskSelected('portablemode')
AllowNoIcons=yes

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

[INI]
Filename: "{app}\freeLib.cfg"; Section: "General"; Flags: createkeyifdoesntexist; Tasks: portablemode
Filename: "{app}\freeLib.cfg"; Section: "General"; Key: "localeUI"; String: "{cm:uiLanguage}"; Tasks: portablemode 
Filename: "{app}\freeLib.cfg"; Section: "General"; Key: "localeABC"; String: "{cm:uiLanguage}"; Tasks: portablemode 

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

[CustomMessages]
PortableMode=Create portable application
russian.PortableMode=Создать переносимую версию
ukrainian.PortableMode=Створити переносиму версію
uiLanguage=""
russian.uiLanguage="ru_RU"
ukrainian.uiLanguage="uk_UA"

